package com.ny.entity;

import java.util.Date;

public class Device {
    private int device_id;               // 设备唯一标识
    private String device_sn;            // 设备序列号
    private String device_name;          // 设备名称
    private int device_type;             // 设备类型：1-灯光 2-空调 3-门锁 4-窗帘 5-传感器
    private int room_id;                 // 所属房间ID
    private int status;                 // 在线状态：0-离线 1-在线
    private String protocol;            // 通信协议
    private Date created_time;           // 创建时间

    // getter和setter
    public int getDeviceId() {
        return device_id;
    }

    public void setDeviceId(int deviceId) {
        this.device_id = deviceId;
    }

    public String getDeviceSn() {
        return device_sn;
    }

    public void setDeviceSn(String deviceSn) {
        this.device_sn = deviceSn;
    }

    public String getDeviceName() {
        return device_name;
    }

    public void setDeviceName(String deviceName) {
        this.device_name = deviceName;
    }

    public int getDeviceType() {
        return device_type;
    }

    public void setDeviceType(int deviceType) {
        this.device_type = deviceType;
    }

    public int getRoomId() {
        return room_id;
    }

    public void setRoomId(int roomId) {
        this.room_id = roomId;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public Date getCreatedTime() {
        return created_time;
    }

    public void setCreatedTime(Date createdTime) {
        this.created_time = createdTime;
    }

    @Override
    public String toString() {
        return "Device{" +
                "deviceId=" + device_id +
                ", deviceSn='" + device_sn + '\'' +
                ", deviceName='" + device_name + '\'' +
                ", deviceType=" + device_type +
                ", roomId=" + room_id +
                ", status=" + status +
                ", protocol='" + protocol + '\'' +
                ", createdTime=" + created_time +
                '}';
    }
}